import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from "../views/Login";
import StudentList from "../views/student/StudentList";
import AllClasses from "../views/student/AllClasses";
import ClassFinished from "../views/student/ClassFinished";
import NotFinishedClass from "../views/student/NotFinishedClass";
import GetPayFee from "../views/student/GetPayFee";
import UpdatePass from "../views/student/UpdatePass";

Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: Home,children:[
      {
        path: '/studentList',
        name: '所有课程',
        component: StudentList
      },
  {
    path: '/classes',
    name: 'AllClasses',
    component: AllClasses
  },
      {
        path: '/finish',
        name: 'ClassFinished',
        component: ClassFinished
      },
      {
        path: '/notFinish',
        name: 'NotFinishedClass',
        component: NotFinishedClass
      },
      {
        path: '/getPayFee',
        name: 'GetPayFee',
        component: GetPayFee
      },
      {
        path: '/updatePass',
        name: 'UpdatePass',
        component: UpdatePass
      },
]
  },


  { path: '/',name: 'Login',component:Login},

  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
